#ifndef COMMON_H_
#define COMMON_H_

#include <string.h>

#ifdef _WIN32
#define PATH_DELIMITER '\\'
#elif __linux__
#define PATH_DELIMITER '/'
#endif

#define __FILE_NAME__ (strrchr(__FILE__, PATH_DELIMITER) ? strrchr(__FILE__, PATH_DELIMITER) + 1 : __FILE__)

#ifdef ENABLE_DPRINT
#define DPRINT(...)											\
	do {													\
		printf(__VA_ARGS__);								\
		printf("   [%s:%d]\n", __FILE_NAME__, __LINE__);	\
	} while (0)
#else
#define DPRINT(...)
#endif


#endif /* COMMON_H_ */
